.x4-faction {
  width: 100%;
  overflow-x: auto;

  &__controls {
    min-height: 2rem;
    align-items: center;

    .input-control {
      display: inline-block;
      margin-right: 1rem;
      min-width: 200px;

      .select {
        margin: 0.5rem 0;
        width: 200px;
      }
    }
  }

  table {
    width: 1400px;
    overflow: scroll;

    th {
      text-align: center;

      &:first-of-type {
        text-align: left;
      }
    }
  }

  &__relation-legend {
    > * {margin-right: 0.5rem;}
  }

  tr {
    border: none;

    &:hover {
      background: var(--color-table-background-active);
    }

    &:nth-of-type(odd) {
      &:hover {
        background: var(--color-table-background-active);
      }
    }
  }

  &__cell {
    text-align: center;
    position: relative;

    > span {
      pointer-events: none;
    }

    &--active {
      background: var(--color-table-background-active);
    }
  }

  &__relation {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;

    &--superbad {
      background: #e80505;
      box-shadow: inset 0 0 2px 3px red;
      color: white;
    }

    &--bad {
      background: #e80505;
      box-shadow: inset 0 0 2px 3px orange;
      color: white;
    }

    &--enemy {
      background: #680505;
      color: white;
    }

    &--neutral {
      font-size: 10px;
      color: var(--color-mutted);
    }

    &--good {
      background: #66AA66;
      color: white;
    }

    &--great {
      background: #50f350;
      color: white;
    }

    &--original {
      position: absolute;
      font-size: 8px;
      left: 2px;
      top: 2px;
    }
  }
}
